/*
 * @Author: NtyAaron
 * @Date: 2021-03-23 14:46:41
 * @LastEditors: NtyAaron
 * @LastEditTime: 2021-04-10 20:04:02
 * @Description: file content
 * @FilePath: \dwq\pages\kitDetail\kitDetail.js
 */
import { getQuestion, getAnswerList } from '../../api/kit/kit.js'
import { _t } from '../../i18n/base.js'

Page({
  data: {
    questionInfo: {},
    answerInfo: {},
  },
  // 获取问题详情
  async getQuestion(e) {
    let { result } = await getQuestion(e)
    this.setData({
      questionInfo: result,
    })
  },
  // 获取答案详情
  async getAnswerList(e) {
    let { result } = await getAnswerList(e)
    this.setData({
      answerInfo: result,
    })
  },
  onLoad(e) {
    wx.setNavigationBarTitle({
      title: _t()['关于'],
    })
    this.getQuestion(e.questionid)
    this.getAnswerList(e.questionid)
  },
})
